package com.tyk.bookstore.back.platform.model.result;


import com.tyk.bookstore.back.common.core.model.result.ResultEnum;

/**
 * @author tyk
 * @description 区域异常
 */
public enum AreaResultEnum implements ResultEnum {

    AREA_NOT_FOUND(3_03_01_01, "区域不存在"),
    AREA_ALREADY_EXISTS(3_03_01_02, "区域已存在"),
    AREA_PARENT_NOT_FOUND(3_03_01_03, "父级区域不存在"),
    AREA_NOT_LOWEST(3_03_01_04, "非最低级区域"),
    AREA_HAS_CHILD(3_03_01_05, "存在下级区域");

    private final Integer code;
    private final String msg;

    AreaResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
